<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>

	<h:panelGrid columns="1" style="width:100%">
		<p:tabView id="userInputTabView">
			<p:tab title="Basic info">
				<ui:include src="userInfoInputPanel.xhtml"></ui:include>
			</p:tab>
			<p:tab title="Detail info">
				<p:tabView>					
					<p:tab title="Orders">
						<ui:include src="userOrderList.xhtml"></ui:include>
					</p:tab>
					<p:tab id="userActivityRcordTab" title="User Activity record">
						<ui:include src="userActivityRecordList.xhtml"></ui:include>
					</p:tab>
					<p:tab title="Account Record">
						<ui:include src="accountRecordList.xhtml"></ui:include>
					</p:tab>
					<p:tab title="Role">
						<ui:include src="userRoleInputPanel.xhtml"></ui:include>
					</p:tab>
				</p:tabView>
			</p:tab>
		</p:tabView>
		<h:panelGrid columns="4" style="width:100%">
			<p:commandButton icon="add" value="new"
				update=":listForm,:detailForm,:headerForm">
				<f:setPropertyActionListener value="#{userModel.newObject}"
					target="#{userController.modelCurrent}" />
			</p:commandButton>
			<p:commandButton value="Save" ajax="true"
				update=":listForm,:detailForm,:headerForm"
				actionListener="#{userController.saveCurrent}" />
			<p:commandButton id="Refresh" value="Cancel" ajax="true"
				update=":listForm,:detailForm,:headerForm"
				actionListener="#{userController.refreshCurrent}" />
			<p:commandButton value="Delete" icon="delete" ajax="true"
				update=":dialogForm" oncomplete="userDeleteDlg.show()" />
		</h:panelGrid>
	</h:panelGrid>


</ui:composition>

</html>